-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys/net/gnrc: Remove code duplication #16502
sys/net/gnrc: Remove code duplication #16502
Conversation
Since I don't have the time to test it myself at the moment, to all testers: Only |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
@jia200x what do you think of this PR? |
I think it makes sense! |
I mean in the scope of DSME coming in and the MAC layers fixed here potentially going out soon ;-) |
Ping! :> Where do we stand here? |
The question still stands if those mac layers are still needed. We have DSME now, and |
Both _rx_management_failed and _rx_management_success functions attempt to sleep after handling the packet reception failure/success. This commit extracts the sleep attempt in a new _rx_management_attempt_sleep function. Signed-off-by: Francois Berder <fberder@outlook.fr>
The function gomach_vtdma_end is nearly identical to _no_vtdma_after_cp expect the first few lines. This commit replaces the duplicating code in gomach_vtdma_end by a call to _no_vtdma_after_cp. Signed-off-by: Francois Berder <fberder@outlook.fr>
630c48c
to
9056e14
Compare
Contribution description
While using simian (a tool that can detect code duplication) on RIOT-OS, I found two snippets of code that were good candidates for being factorized.
This pull request does not change the behavior of gnrc.
Testing procedure
I compiled for the SAMD21-XPRO board the following examples:
gnrc_minimal
,gnrc_networking
andgnrc_networking_mac
.Issues/PRs references
None.